<?php
$action = $_REQUEST['action'];
switch($action){
	case 'changerTheme':{

		$nom = $_SESSION['nom'];
		$prenom = $_SESSION['prenom'];
		$theme = $_SESSION['theme'];
		if ($theme == 1){
		$pdo->updateTheme2($nom, $prenom);
		
		}
		else {
			$pdo->updateTheme1($nom, $prenom);
		}
		
		$theme = $pdo->getThemeAdminUpdate($nom, $prenom);
		
		$_SESSION['theme'] = $theme;
		
        
		include("vues/v_changer_theme.php");
		break;
		}
	case 'choixTheme':{
		include("vues/v_changer_theme.php");
		break;
	}
	default :{
		include("vues/v_changer_theme.php");
		break;
	}
}
?>